package com.liang.mapper;

import com.liang.mall.entity.Menu;
import com.liang.mall.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liang
 * @since 2021-05-12
 */
@Mapper
@Component
public interface RoleMapper extends BaseMapper<Role> {

    List<Role> selectListRole(Integer adminId);

    List<Menu> selectListPerms(Integer adminId);

    Integer deleteUser_Role_ByRoleId(Integer id);

    Integer delete_Role_Resource_ByRoleId(Integer id);

    Integer delete_Role_ByRoleId(Integer id);

    void insertRoleResource(@Param("id") Integer id, @Param("menuId") Integer menuId);


}
